package com.njwb.feign.client;

import com.njwb.feign.fallback.UserServiceClientFallbackFactory;
import com.njwb.json.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

@Service
@FeignClient(value = "nacos-provider",fallbackFactory = UserServiceClientFallbackFactory.class)//服务提供者名称
public interface UserServiceClient {
    @GetMapping("/user/{id}")
    public ResponseResult findById(@PathVariable("id") Integer id);
}
